@include('public.page_styles')
<style>

  .block-heading {
    border-bottom: 1px solid #a6a6a6;
    border-left: none;
    color: #505050;
    display: block;
    margin-bottom: 0px;
    text-shadow: none;
    text-transform: none;
    font-weight: bold;
    font-size: .85em;
    line-height: 3em;
  }
  a.block-heading, .block-heading a {
    color: #505050;
    background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #dddddd), color-stop(1, #fafafa));
    display: block;
    padding-left: 1em;
    border-top: 1px solid #fff;
    outline: none;
  }
  .block {
    border: 1px solid #ccc;
    background: white;
    margin: 1em 0em;
  }
  .block-body.collapse {
    margin-top: 0em;
    margin-bottom: 0em;
  }
  .collapse.in {
    height: auto;
  }
  .block-body {
    margin: 1em;
    min-height: .25em;
  }
  .collapse {
    position: relative;
    overflow: hidden;
    transition: height 0.35s ease;
  }
  .table {
    margin-bottom: 20px;
    margin-top: 12px;
    border: 1px solid #f0f0f0;
  }
  #example1_paginate{
    float: right;
  }

</style>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
  @include('public.top')
  <!-- Left side column. contains the logo and sidebar -->
  @include('public.sidebar')
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        {{ trans('message.order') }}
        <small>{{ trans('message.detail') }}</small>
      </h1>
      <ol class="breadcrumb">
        <li><a ><i class="fa fa-dashboard"></i> {{ trans('message.home') }}</a></li>
        <li><a href="{{ url('order/list') }}">{{ trans('message.orderManage') }}</a></li>
        <li class="active">{{ trans('message.order') }}{{ trans('message.detail') }}</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-xs-12">
          <div class="box">
            <div class="box-header with-border">
              <h3 class="box-title"></h3>
              <div class="box-tools">
                <div class="btn-group pull-right" style="margin-right: 10px">
                  <a href="{{ url('order/list') }}" class="btn btn-sm btn-default"><i class="fa fa-list"></i>&nbsp;{{ trans('message.list') }}</a>
                </div>
                <div class="btn-group pull-right" style="margin-right: 10px">
                  <a class="btn btn-sm btn-default form-history-back" onclick="goBack()"><i class="fa fa-arrow-left"></i>&nbsp;{{ trans('message.history-back') }}</a>
                </div>
              </div>
            </div>

            <!-- /.box-header -->
            <div class="block">
              <a href="#page-stats" class="block-heading" data-toggle="collapse">订单信息</a>
              <div id="page-stats" class="block-body collapse in">
                <table class="table table-striped">
                  <tbody>
                  @if($orderInfo)
                    <tr>
                      <td>订单编号</td><td>{{ $orderInfo->order_no }}</td>
                      <td>订单状态</td><td>{{ state_config('order',$orderInfo->state) }}</td>
                      <!-- <td>订单状态</td><td><button onclick="status()"><{$indents.status}></button></td> -->
                      <input type="hidden" id="status" value="{{ $orderInfo->state }}" />
                      <input type="hidden" id="id" value="{{ $orderInfo->id }}" />
                    </tr>
                    <tr>
                      <td>用户信息</td><td>{{ $orderInfo->nickname }}&nbsp;&nbsp;&nbsp;&nbsp;{{ $orderInfo->phone }}</td>
                      <td>下单时间</td><td>{{ $orderInfo->create_date }}</td>
                    </tr>
                    <tr>
                      <td>应付金额</td><td>{{ $orderInfo->actual_money }}&nbsp;¥</td>
                      <td>实付金额</td><td>{{ $orderInfo->order_money }}&nbsp;¥</td>
                    </tr>
                    <tr>
                      <td>优惠信息</td><td>{{ $orderInfo->couponName }}</td>
                      <td>门店信息</td><td>{{ $orderInfo->shopName }}</td>
                    </tr>
                    @if($orderInfo->state == 5 || $orderInfo->state==6)
                      <tr>
                        <td><label>退款时间</label></td><td>{{ $orderFundInfo->create_date }}</td>
                        <td><label>退款原因</label></td><td>
                          @if($orderFundInfo->check_text)
                            @foreach($orderFundInfo->check_text as $value)
                              {{ state_config('order_refund',$value) }}　&nbsp;
                            @endforeach
                          @endif&nbsp;&nbsp;&nbsp; <label>描述：</label>{{ $orderFundInfo->desc_text }}</td>
                      </tr>
                      @elseif($orderInfo->state == 3 || $orderInfo->state==4)
                      <tr>
                        <td >洗车次数</td>
                        <td colspan="3">{{ $orderInfo->number_times }}</td>
                      </tr>
                    @endif
                  @endif
                  </tbody>
                </table>
              </div>
            </div>

            <div class="block">
              <a href="#page-stats" class="block-heading" data-toggle="collapse">洗车信息</a>
              <div id="page-stats" class="block-body collapse in">
                <table id="example1"  class="table table-striped">
                  <thead>
                  <tr>
                    <th style="width:100px">洗车时间</th>
                    <th style="width:40px">车牌号</th>
                    <th style="width:50px">网点名称</th>
                    <th style="width:100px">设备编号</th>
                    <th style="width:50px">车辆颜色</th>
                    <th style="width:50px">车辆类型</th>
                    <th style="width:50px">车辆方向</th>
                  </tr>
                  </thead>
                  <tbody>
                  @if($orderUseHistory)
                    @foreach($orderUseHistory as $history)
                      <tr>
                        <td>{{ $history->time }}</td>
                        <td>{{ $history->car_code }}</td>
                        <td>{{ $history->shopName }}</td>
                        <td>{{ $history->serial_no }}</td>
                        <td>{{ $history->licenseplateColor }}</td>
                        <td>{{ $history->licenseplateType }}</td>
                        <td>{{ $history->licenseplateMoveDir }}</td>
                      </tr>
                    @endforeach
                    @endif
                  </tbody>
                </table>
              </div>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
      </div>
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  @include('public.bottom')
  <!-- Control Sidebar -->
  {{--@include('public.aside')--}}
  <!-- /.control-sidebar -->
  <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->
  <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->
@include('public.javascript')
<script src="{{ asset ("/AdminLTE/bower_components/jquery-slimscroll/jquery.slimscroll.min.js") }}" type="text/javascript"></script>
{{--<script src="{{ asset ("/AdminLTE/bower_components/fastclick/lib/fastclick.js") }}" type="text/javascript"></script>--}}

<script src="{{ asset ("/AdminLTE/bower_components/datatables.net/js/jquery.dataTables.min.js") }}" type="text/javascript"></script>
<script src="{{ asset ("/AdminLTE/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js") }}" type="text/javascript"></script>

<script>
    $(function(){
        $('#example1').DataTable({
            "language": {
                "url":"{{ asset ("/AdminLTE/bower_components/datatables.net/chinese.json") }}"
            },
            "bFilter": false,    //去掉搜索框方法三：这种方法可以
            "bLengthChange": false,   //去掉每页显示多少条数据方法
            "aaSorting": [[ 0, "desc" ]],//默认第几个排序
            "bStateSave": true,//状态保存
            "aoColumnDefs": [
                //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                {"orderable":false,"aTargets":[1,2,3,4,5,6]}// 制定列不参与排序
            ]
        });
    });
</script>


</body>
</html>
